package my.poemhelper.mb;

import my.poemhelper.Facade;
import my.poemhelper.vo.Idiom;



public class IdiomMB extends BaseMB<Idiom>{
	
	private String queryWord;
	private Idiom idiom = new Idiom();
	private Long optId;
	
	private String addResult;
	
	
	public String queryIdiom(){
		Facade.facade.queryIdiom(queryWord, pageControl);
		return "";
	}
	
	
	public String addIdiom(){
		Facade.facade.insertIdiom(idiom);
		idiom = new Idiom();
		addResult = "添加成功";
		Facade.facade.queryIdiom(queryWord, pageControl);
		return "idiomAddResult";
	}
	
	public String delIdiom(){
		return "";
	}
	
	public String showIdiomDetail(){
		return "";
	}

	public String getQueryWord() {
		return queryWord;
	}

	public void setQueryWord(String queryWord) {
		this.queryWord = queryWord;
	}

	public Idiom getIdiom() {
		return idiom;
	}

	public void setIdiom(Idiom idiom) {
		this.idiom = idiom;
	}

	public Long getOptId() {
		return optId;
	}

	public void setOptId(Long optId) {
		this.optId = optId;
	}


	public String getAddResult() {
		return addResult;
	}


	public void setAddResult(String addResult) {
		this.addResult = addResult;
	}


	@Override
	protected String getAddString() {
		return "idiomAdd";
	}
	
}
